hysop.operator.plotters module¶
- class hysop.operator.plotters.FieldPlotter2D(name, fields, variables, fig_title=None, imshow_kwds=None, add_colorbars=True, symmetric_cbar=False, fig=None, axes=None, shape=None, **kwds)[source]¶
Bases:
PlottingOperator
Base operator to plot 2D fields at runtime.
Create the common attributes of all host operators.
All input and output variable topologies should be of kind Backend.HOST and share the same HostEnvironment.
- discretize()[source]¶
By default, an operator discretize all its variables. For each input continuous field that is also an output field, input topology may be different from the output topology.
After this call, one can access self.input_discrete_fields and self.output_discrete_fields, which contains input and output dicretised fields mapped by continuous fields.
self.discrete_fields will be a tuple containing all input and output discrete fields.
Discrete tensor fields are built back from discretized scalar fields and are accessible from self.input_tensor_fields, self.output_tensor_fields and self.discrete_tensor_fields like their scalar counterpart.
- class hysop.operator.plotters.ParameterPlotter(name=None, dump_dir=None, update_frequency=1, save_frequency=100, axes_shape=(1,), figsize=(30, 18), visu_rank=None, fig=None, axes=None, force_backend=None, **kwds)[source]¶
Bases:
PlottingOperator
Base operator to plot parameters during runtime.
Create the common attributes of all host operators.
All input and output variable topologies should be of kind Backend.HOST and share the same HostEnvironment.
- class hysop.operator.plotters.PlottingOperator(name=None, dump_dir=None, update_frequency=1, save_frequency=100, axes_shape=(1,), figsize=(30, 18), visu_rank=None, fig=None, axes=None, force_backend=None, **kwds)[source]¶
Bases:
HostOperatorBase
Base operator for plotting.
Create the common attributes of all host operators.
All input and output variable topologies should be of kind Backend.HOST and share the same HostEnvironment.
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- create_topology_descriptors()[source]¶
- Called in get_field_requirements, just after handle_method
- Topology requirements (or descriptors) are:
min and max ghosts for each input and output variables
allowed splitting directions for cartesian topologies
- get_field_requirements()[source]¶
Called just after handle_method(), ie self.method has been set. Field requirements are:
required local and global transposition state, if any.
required memory ordering (either C or Fortran)
Default is Backend.HOST, no min or max ghosts, MemoryOrdering.ANY and no specific default transposition state for each input and output variables.
- get_node_requirements()[source]¶
Called after get_field_requirements to get global operator requirements.
- By default we enforce unique:
*transposition state *cartesian topology shape *memory order (either C or fortran)
Across every fields.
- classmethod supported_backends()[source]¶
Return the backends that this operator’s topologies can support as a set. By default all operators support only Backend.HOST.